package com.rybbaby.tss.platform.sysRoleGroup.entity;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @description 角色分组
 * 
 * @author 谢进伟
 * 
 * @createDate 2017-12-16 下午10:18:23
 */
@Entity
@Table(name = "sys_role_group")
@DynamicUpdate(true)
@DynamicInsert(true)
public class SysRoleGroup implements Serializable {
	
	private static final long serialVersionUID = 133036581468602L;

	/** 主键 **/
	private String id;
	/** 分组名 **/
	private String name;
	/** 分组码 **/
	private String code;
	/** 创建时间 **/
	private java.sql.Timestamp createTime;
	/** 版本 **/
	private Integer version;


	@Id
	@GeneratedValue(generator = "sys_role_groupIDGenerator" , strategy = GenerationType.AUTO)
	@GenericGenerator(name = "sys_role_groupIDGenerator" , strategy = "uuid")
	@Column(name = "id", nullable= false, length = 32)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	@Column(name = "name", nullable= true, length = 255)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "code", nullable= true, length = 64)
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	@Column(name = "createtime", nullable= true, length = 19)
	public Timestamp getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}
	@Version
	@Column(name = "version", nullable= true, length = 11)
	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}
}